﻿@using Emoney.UserTraining.Model;
@using Emoney.UserTraining.BLL;
@using Emoney.UserTraining.Comm;
@{
    ViewBag.Title = "mytrain";
    Layout = "~/Views/Shared/_TrainLayout.cshtml";
}
@{
    List<TrainNetwoekAndUser> tmulst = ViewBag.tmulst;
    List<Web_TrainUser> wtulst = ViewBag.wtulst;
    int index = 1;
    var uid = ViewBag.uid;
}
<div id="menuflag" style="display: none">4</div>
<div class="content">
    <div class="mytrain">
        <div id="divMyTrainDetail"></div>
        @*<div class="tablestyle t1" id="divMyTrainDetail"></div>*@
        @*<div class="bookinfo">
            本月已预约<span class="red fw">@wtulst.Count</span> 场地面培训 
            <img src="@StringTools.GetStaticFile("Images/Train/images/btn6.jpg")" alt="查看" class="fn" id="ckdmtrain"  style ="cursor:pointer;"/>
        </div>*@

    </div>
    @Html.Partial("dbqq")
</div>
<script>
    $(document).ready(function () {
        var strpage = getQueryStringByName("page");
        var uid = "@uid";
        reloadRef("mytrainDetail?page=" + strpage + "&uid=" + uid, "divMyTrainDetail");
    });
    function getQueryStringByName(name) {
        var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
        if (result == null || result.length < 1) {
            return "";
        }
        return result[1];
    }
    function closeOrder(id, isOrder, meetid) {
        if (confirm("您确定要取消预约吗?")) {
            AddClickCount("ModifyUserById", "取消预约", meetid);
            var uid = "@uid";
            $.post(www + "Train/ModifyUserById", { id: id, isOrder: isOrder,uid:uid }, function (data) {
                if (data != null && data != "") {
                    if (data == "1") {
                        alert("取消预订成功！");
                        location.reload();
                    } else {
                        alert("取消预订失败！");
                    }
                }
            });
        }
    }
    //$.post(www + "Train/mytrainDetail", { uid: uid }, function (data) {
    //    $("#divMyTrainDetail").html(data);
        
    //});

  
</script>
